<?php
/**
 * Installer language selection page
 *
 * @copyright		The XOOPS project http://www.xoops.org/
 * @license			http://www.fsf.org/copyleft/gpl.html GNU General Public License (GPL)
 * @package			installer
 * @since			2.0.18
 * @version			$Id: page_modcheck.php 606 2006-07-02 13:49:40Z skalpa $
 *
 * @author			Haruki Setoyama  <haruki@planewave.org>
 * @author			Kazumi Ono <webmaster@myweb.ne.jp>
 * @author			Skalpa Keo <skalpa@xoops.org>
 * @author			dugris <dugris@frxoops.org>
**/

require_once 'common.inc.php';
if ( !defined('XOOPS_INSTALL') ) { die('XOOPS Custom Installation die'); }

$wizard->setPage( 'modcheck' );
$wizard->ext_loaded();
$pageHasForm = false;

$diagsOK = false;

ob_start();

echo "<table class='diags'>
		<caption>" . REQUIREMENTS . "</caption>
		<thead><tr><th colspan='2'></th></tr></thead>
		<tfoot><tr><td colspan='2'></td></tr></tfoot>
		<tbody>
		<tr>
			<td class='bold'>" . SERVER_API . "</td>
			<td>" . php_sapi_name() . "<br />" . $_SERVER["SERVER_SOFTWARE"] . "</td>
		</tr>
		<tr>
			<td class='bold'>" . _PHP_VERSION . "</td>
			<td>" . xoPhpVersion() . "</td>
		</tr>
		<tr>
			<td class='bold'>" . _MYSQL_VERSION . "</td>
			<td>" . xoDiag( function_exists( 'mysql_connect' ) ? 1 : -1, @mysql_get_client_info() ) . "</td>
		</tr>
		<tr>
			<td class='bold'>" . sprintf( PHP_EXTENSION, 'Session' ) . "</td>
			<td>" . xoDiag( extension_loaded( 'session' ) ? 1 : -1 ) . "</td>
		</tr>
		<tr>
			<td class='bold'>" . sprintf( PHP_EXTENSION, 'PCRE' ) . "</td>
			<td>" . xoDiag( extension_loaded( 'pcre' ) ? 1 : -1 ) . "</td>
		</tr>
		<tr>
			<td class='bold'>" . _FILE_UPLOADS . "</td>
			<td>" . xoDiagBoolSetting( 'file_uploads', true ) . " - " . ini_get('upload_max_filesize') . "</td>
		</tr>
		</table>";


echo "<table class='diags'>
		<caption>" . RECOMMENDED_EXTENSIONS . "</caption>
		<thead><tr><th colspan='2' class='confirmMsg'>" . RECOMMENDED_EXTENSIONS_MSG . "</th></tr>
		<tfoot><tr><td colspan='2'></td></tr></tfoot>
		</thead>
		<tbody>
		";

		foreach ( $wizard->extensions as $key => $value) {
			echo "<tr>
					<td>" . $value[1] . "</td>
					<td>" . $value[2] . "</td>
					</tr>
					";
		}
echo "</tbody>
		</table>";

/*
echo "<table class='diags'>
		<caption>" . CHECKING_PERMISSIONS . "</caption>
		<tfoot><tr><td colspan='2'></td></tr></tfoot>
		<tbody>";

		foreach ( $wizard->paths as $path ) {
			echo "<tr>
					<td class='head bold'>" . $path . "</td>
					<td>" . xoDiagIfWritable( $path ) . "</td>
					</tr>";
      }
echo "</tbody>
		</table>";
*/

$content = ob_get_contents();
ob_end_clean();

include 'install_tpl.php';

?>